package edu.uw.tcss360.group6.gui;

import javax.swing.*;
import java.awt.*;

/**
 * Created with IntelliJ IDEA.
 * edu.uw.tcss360.group6.model.User: Lemtzas
 * Date: 2/20/13
 * Time: 9:08 PM
 * To change this template use File | Settings | File Templates.
 */
@SuppressWarnings("serial")
public class TopPanel extends JPanel {
    private static final int PREFERRED_WIDTH  = 500;
    private static final int PREFERRED_HEIGHT = 50;
    private static final String DEFAULT_TITLE = "BeWeavers";

    private JLabel label;

    public TopPanel() {
        super();
        this.setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS));
        this.setBackground(Color.BLACK);
        this.setPreferredSize(new Dimension(PREFERRED_WIDTH,PREFERRED_HEIGHT));
        JLabel label = new JLabel(DEFAULT_TITLE);
        label.setForeground(Color.WHITE);
        label.setAlignmentX(Component.LEFT_ALIGNMENT);
        label.setFont(label.getFont().deriveFont(30f).deriveFont(Font.BOLD));
        label.setSize(50,500);
        this.add(label);
    }

    public void setText( String text ) {
        label.setText(text);
    }

    @Override
    public Insets getInsets()
    {
        return new Insets(0,10,3,0);
    }
}
